package jzOffer;

public class Num24 {
    public ListNode reverseList(ListNode head) {
        if(head==null || head.next==null) return head;
        ListNode secHead=head.next;
        ListNode newHead=reverseList(secHead);
        secHead.next=head;
        head.next=null;
        return newHead;
    }
}
